#! /bin/bash
# author: 我的代码温柔如风
# see https://kubernetes.io/zh/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/

echo "=================================================="
echo "1、检查拉取镜像"
echo "=================================================="
# 检查拉取
chmod +x ../../func_lib.sh
source ../../func_lib.sh
pullIfNotExist wordpress:4.8-apache
pullIfNotExist mysql:5.6

echo "=================================================="
echo "2、Kubernetes部署"
echo "=================================================="
# 启动
kubectl apply -k ./
# 清楚
# kubectl delete -k ./

echo "=================================================="
echo "3、完成"
echo "=================================================="
